package action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import dao.StudentDao;
import dao.impl.StudentDaoImpl;
import entity.Student;
import exception.ExamException;
import service.ExamService;
import service.impl.ExamServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * Created by honghao on 2017/2/26.
 */
public class ListStudentAction extends ActionSupport{
    private static ExamService examService = new ExamServiceImpl();
    private static StudentDao stuDao = new StudentDaoImpl();

    public String list() {
        Map<String,Object> request = (Map<String, Object>) ActionContext.getContext().get("request");
        List<Student> studentList = stuDao.findAllByPage(1, 2);
        request.put("studentList",studentList);
        return SUCCESS;
    }

}
